const API_CODE = require("apiCode");
let apiCall = require("./api/apiCall");
let PlatformUtils = require('PlatformUtils');
let PlayerData = require('./PlayerData');
/**
 * 如果有必要向服务器报告邀请
 */
let reportInviteIfNeed = function () {
  return;
  // let onShowRes = PlatformUtils.getOnShowRes();
  // let query = onShowRes.query ? onShowRes.query : {};
  //
  // if (PlayerData.instance.getUserId() !== undefined) {
  //   //如果query中包含scr_uid, 表示是从分析卡片中进入的, 向服务器报告好友邀请信息
  //   if (query.src_uid !== undefined && query.action !== undefined) {
  //     console.log("发送邀请报告:", PlayerData.instance.getUserId(), query);
  //     let data = Object.assign({uid: PlayerData.instance.getUserId()}, query);
  //     apiCall.inviteReport(data, (err, res) => {
  //       if (err) {
  //         console.log("apiCall.inviteReport发生错误:", err);
  //         return;
  //       }
  //       if (res.code === API_CODE.SUCCEED) {
  //         //TODO:  根据游戏逻辑添加邀请后代码
  //       }
  //     });
  //   }
  // }
};


module.exports = reportInviteIfNeed;